// 通用 API 层类型（修复后）
export interface ApiResponse<T = any> {
  accessToken?: string;
  success: boolean;          
  code: number;              
  message?: string;          
  data: T;                    
}

export interface ApiError {
  message: string;
  status?: number;
  code?: string | number;
  isNetworkError?: boolean;
  isCancel?: boolean;
  raw?: any;
}

// 通用分页数据结构（所有分页接口统一使用）
export interface PageData<T> {
  list: T[];
  total: number;
  pageNum: number;
  pageSize: number;
  pages: number;
  size: number;
  startRow: number;
  endRow: number;
  prePage: number;
  nextPage: number;
  isFirstPage: boolean;
  isLastPage: boolean;
  hasPreviousPage: boolean;
  hasNextPage: boolean;
  navigatePages: number;
  navigatepageNums: number[];
  navigateFirstPage: number;
  navigateLastPage: number;
}